home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / SOUND.SWG / 0024_VOC.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-04  |  3KB  |  69 lines

  1.  
  2. Creative Voice (VOC) file format
  3. --------------------------------
  4.  
  5.     HEADER (bytes 00-19)
  6.     Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]
  7.  
  8. ----------------------------------------------------------------
  9.  
  10. HEADER:
  11. =======
  12.      byte #     Description
  13.      ------     ------------------------------------------
  14.      00-12      "Creative Voice File"
  15.      13         1A (eof to abort printing of file)
  16.      14-15      Offset of first datablock in .voc file (std 1A 00
  17.                 in Intel Notation)
  18.      16-17      Version number (minor,major) (VOC-HDR puts 0A 01)
  19.      18-19      2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)
  20.  
  21. ----------------------------------------------------------------
  22.  
  23. DATA BLOCK:
  24. ===========
  25.  
  26.    Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
  27.    NOTE: Terminator Block is an exception -- it has only the TYPE byte.
  28.  
  29.       TYPE   Description     Size (3-byte int)   Info
  30.       ----   -----------     -----------------   -----------------------
  31.       00     Terminator      (NONE)              (NONE)
  32.       01     Sound data      2+length of data    *
  33.       02     Sound continue  length of data      Voice Data
  34.       03     Silence         3                   **
  35.       04     Marker          2                   Marker# (2 bytes)
  36.       05     ASCII           length of string    null terminated string
  37.       06     Repeat          2                   Count# (2 bytes)
  38.       07     End repeat      0                   (NONE)
  39.       08     Extended        4                   ***
  40.  
  41.       *Sound Info Format:       **Silence Info Format:
  42.        ---------------------      ----------------------------
  43.        00   Sample Rate           00-01  Length of silence - 1
  44.        01   Compression Type      02     Sample Rate
  45.        02+  Voice Data
  46.  
  47.     ***Extended Info Format:
  48.        ---------------------
  49.        00-01  Time Constant: Mono: 65536 - (256000000/sample_rate)
  50.                              Stereo: 65536 - (25600000/(2*sample_rate))
  51.        02     Pack
  52.        03     Mode: 0 = mono
  53.                     1 = stereo
  54.  
  55.  
  56.   Marker#           -- Driver keeps the most recent marker in a status byte
  57.   Count#            -- Number of repetitions + 1
  58.                          Count# may be 1 to FFFE for 0 - FFFD repetitions
  59.                          or FFFF for endless repetitions
  60.   Sample Rate       -- SR byte = 256-(1000000/sample_rate)
  61.   Length of silence -- in units of sampling cycle
  62.   Compression Type  -- of voice data
  63.                          8-bits    = 0
  64.                          4-bits    = 1
  65.                          2.6-bits  = 2
  66.                          2-bits    = 3
  67.                          Multi DAC = 3+(# of channels) [interesting--
  68.                                        this isn't in the developer's manual]
  69.